package com.huang.clients;

import com.huang.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("product")
public interface ProductClient {

    @GetMapping("/product/find")
    Map<String,Object> find(@RequestParam("id") String id);
    @PostMapping("/product/add")
    Map<String,Object> add(@RequestBody Product product);
}
